import { createApp } from 'vue'
import App from './App.vue'
import 'virtual:svg-icons-register'
import '@/style/index.scss'
import "vue3-json-viewer/dist/index.css"
import { setupElementPlus } from './plugins/element-plus'
import router, {setupRouter} from "./router";
import {setupGlobalCom} from "./components";
import {setPinia} from "./pinia";
import init from "@/util/init";
import Codemirror from "codemirror-editor-vue3";
// @ts-ignore
import JsonViewer from "vue3-json-viewer";
const app = createApp(App);
app.component('Codemirror', Codemirror);
app.use(JsonViewer)

setupRouter(app)// 引入路由

setPinia(app) //引入状态管理

setupGlobalCom(app)//注册全局公用组件

setupElementPlus(app)// 使用element-plus插件

init().then(()=>{
    router.isReady().then(()=>{
        app.mount('#app')
    })
})

